<?php                					
		$sanpham=new SanPham();
		$sql=$sanpham->GetAll_SanPham();			
		echo'<table>';
		if (isset($_GET['p'])) $pindex = $_GET['p']; else $pindex = 1;
			$psize = 4;
			$sanpham=new SanPham();
			$sql = $sanpham->get_by_page($psize,$pindex);
			$str_p = $sanpham->print_page();
		while($row = @mysql_fetch_array($sql))
			{
			echo'<tr>';
			echo'<td><img src=../Managerment/Upload/'.$row['HinhAnh'].'><br>'.$row['TenSP'].'<br>'.$row['Gia'].'<br>'.$row['MoTa'].'</td>';
			if($row = @mysql_fetch_array($sql))
			{
				echo'<td><img src=../Managerment/Upload/'.$row['HinhAnh'].'><br>'.$row['TenSP'].'<br>'.$row['Gia'].'<br>'.$row['MoTa'].'</td>';
			} 
			echo '</tr>';
			}
			echo '</table>';				
			echo "<div class='topmenu'; align='left'>Page ".$str_p."</div>";
?>
